package controller;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import entity.Dirty;

import java.util.Map;

public class DirtyAction extends ActionSupport {
    private String name;
    private String detail;
    public String execute(){
        System.out.println("走到这里了"+name);
        Map<String,Object> map = (Map<String, Object>) ActionContext.getContext().get("request");
        Dirty dirty = new Dirty(name,detail);
        map.put("dirty",dirty);
        return "success";
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }
}
